1. Field of the Invention
The present invention relates generally to systems and methods for intra-computer communication, and more particularly to systems and methods for message-based client-server communication. Still more particularly, the present invention is an object oriented message passing system and method.
2. Description of the Background Art
In intra-computer communications, a client task requires a service provided by a server task. For example, a client task may require window creation or file deletion services. The particular service that the client task requires is performed by an appropriate server task, such as a window manager or a file system. A message is the unit of communication interchange between a client and a server. Thus, in order to inform a server that a particular service is required, the client task sends or issues an appropriate message. Upon receiving an issued message, the server task performs the required actions. Message passing systems and methods determine the manner in which a message that has been issued by a client task is delivered to a server task.
In the prior art, message passing systems and methods have relied upon a task-based message passing model, a port-based message passing model, or a port-set-based message passing model. Referring now to FIG. 1, a block diagram of a task-based message passing model is shown. In the task-based message passing model, when a client task requires a particular service, the client task sends a message directly to a server task that performs types of services related to the particular service required. Because multiple client tasks may require a service provided by the same server task, each server task present must support message queuing and message dispatch, both of which introduce an undesirable level of server task complexity. Moreover, because server tasks must support message queuing and message dispatch, memory beyond that required to implement a set of services must be available to each server task. An additional drawback associated with the task-based message passing model is that a client task and a corresponding server task are bound together in an inflexible manner, with each server task being dedicated to only one type of service. The inflexible binding found in the task-based message passing model also introduces an undesirable level of complexity when the behavior of the client task or the server task is to be modified or evolved.
Referring now to FIG. 2A, a block diagram of a port-based message passing model is shown. In the port-based message passing model, a message port represents a type of service available to a client task. Client tasks send messages to message ports rather than directly to server tasks. Messages sent to a given message port are queued within the message port by the operating system. Thus, to a server task, each message port represents a message queue. Multiple server tasks can compete to receive and process messages from any message port, thereby decoupling client tasks from server tasks. Client tasks commonly require many different types of services; hence, multiple message ports are required. Each message port requires a significant amount of memory to implement. Some prior art operating systems require that a unique port be present for each client task present.
Within a computer system, a message passing system generally resides within an operating system, which in turn resides within the computer system's memory. The total amount of memory available in the computer system is limited, and the memory must therefore be treated as a shared resource. It is thus highly desirable to have an operating system that occupies as little memory as possible. Message passing systems and methods that are based upon the port-based message passing model are undesirable because the memory required to implement each port significantly adds to the operating system's memory requirements. In personal computer systems, less memory is typically available than in other computer systems. Hence, message passing systems and methods that rely upon the port-based message passing model are particularly undesirable in personal computer systems.
Commonly, client tasks and server tasks function in different address spaces. In prior art message passing systems and methods that rely upon the port-based message passing model, when a client task and a server task operate in different address spaces, the message passing system or method must perform a mapping between address spaces prior to transferring a message from the client task to the server task. After the mapping between address spaces has been performed, the server task performs the required service. Often, particular services, such as input/output (I/O) operations, must be performed as rapidly as possible. The mapping between address spaces performed by prior art message passing systems and methods that rely upon the port-based message passing model undesirably increases the amount of time required to complete the service. Thus, prior art systems and methods that rely upon the port-based message passing model are undesirable in time-critical situations when client tasks and server tasks function in different address spaces.
Referring now to FIG. 2B, a block diagram of a port-set-based message passing model is shown. The port-set-based message passing model is a variant of the port-based message passing model described above. In the port-set-based message passing model, one or more message ports are associated to form a common port set. Each port set represents a particular type of service, and each individual message port represents a particular resource that can utilize the service associated with the port set to which it belongs. Client tasks therefore view individual message ports as resources to which messages can be sent. The additional level of structural granularity provided by the port-set-based message passing model significantly simplifies message decoding and message prioritization operations that must be performed by server tasks. As in the case of the port-based message passing model, however, each message port requires a significant amount of memory to implement. Therefore, message passing systems and methods that rely upon the port-set-based message passing model require even more memory than those that rely upon the port-based message passing model. Prior art message passing systems and methods that rely upon the port-set-based message passing model also suffer from the address space translation drawbacks described above in relation to the port-based message passing model.
What is needed is a means for message passing that provides a high level of structural granularity, that minimizes memory requirements, and that can reduce the time required to perform time-critical operations when client tasks and server tasks function in different address spaces.